//导入express
const express = require("express")
//创建Router实例
const router = express.Router()

const {articlePublish} = require("../router-handler/article");
const {upload} = require("../utils/fileUpload");
const {article_add_schema} = require("../schema/article");
const expressJoi = require("@escook/express-joi");


//定义发布文章接口
router.post("/publish",upload.single("cover_img"), expressJoi(article_add_schema), articlePublish)


//导出router模块
module.exports = router;

